package com.qf.fmall2302.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

import javax.websocket.server.ServerEndpoint;

/**
 * 向IOC容器中添加ServerEndpointExporter类型的bean
 * 作用：可以识别到我们编写的 websocket类上的 @ServerEndpoint 注解
 */
@Configuration
public class WebSocketConfig {

    @Bean
    public ServerEndpointExporter endpointExporter(){
        return new ServerEndpointExporter();
    }

}
